package yrl.threads.account;

public class DrawMoney implements Runnable{
	private Account account;
	private double amount;
	
	public DrawMoney() {
		super();
	}

	public DrawMoney(Account account, double amount) {
		super();
		this.account = account;
		this.amount = amount;
	}

	/**
	 * @return the account
	 */
	public Account getAccount() {
		return account;
	}

	/**
	 * @param account the account to set
	 */
	public void setAccount(Account account) {
		this.account = account;
	}

	/**
	 * @return the amount
	 */
	public double getAmount() {
		return amount;
	}

	/**
	 * @param amount the amount to set
	 */
	public void setAmount(double amount) {
		this.amount = amount;
	}

	@Override
	public void run() {
		// TODO Auto-generated method stub
		this.account.drawMoney(amount);
	}

}
